package cg.cmm.alioss.utils;

/**
 * @author: baibing
 * create time: 2024-12-01 22:19
 * description:
 */
public class FileSizeUnit {

    public Long fileSize;

    public FileSizeUnit(Long size) {
        this.fileSize = size;
    }

    public Long getTotalFileSize() {
        return fileSize;
    }

    public static FileSizeUnit ofKBeye(Long size) {
        return new FileSizeUnit(size * 1024L);
    }

    public static FileSizeUnit ofMBeye(Long size) {
        return new FileSizeUnit(size * 1024 * 1024L);
    }

    public static FileSizeUnit ofGBeye(Long size) {
        return new FileSizeUnit(size * 1024 * 1024 * 1024L);
    }
}
